﻿@using FormBuilder.Components.Drag
@using FormBuilder.Helpers
@inject ITranslationHelper translationHelper

<DraggableFormElement IsEditModeEnabled=@IsEditModeEnabled ParentContext="@ParentContext" Context="@Context" TDialog="FormButtonDialog" TRecord="FormButtonRecord" Record="@Value">
    <Children>
        <button disabled="@(Value.IsSubmitting)" type="submit" class="@BtnClass">
            @(Value.IsSubmitting ? "Submitting..." : translationHelper.Translate(Value, InputData, !IsEditModeEnabled))
        </button>
    </Children>
</DraggableFormElement>